package com.neutech.solar.entity;

import com.neutech.solar.util.ImageUtil;

import java.awt.*;

/**
 * @Author DELL
 * @Date 2021/1/26 17:56
 * @Version 1.0
 */
public class Background extends AbstractSolarSystemObject{

    public Background(){
        this.x = 0;
        this.y = 0;
        this.img = ImageUtil.getImage("bg.png");
    }

    public Background(String imageName){
        this();
        this.img = ImageUtil.getImage(imageName);
    }

    public Background(int x,int y,String imageName){
        this.x = x;
        this.y = y;
        this.img = ImageUtil.getImage(imageName);
    }


    @Override
    public void draw(Graphics g) {
        g.drawImage(img,x,y,null);
    }

}